const state = {
  meum: [],
  currentMeum: '/',
  isCollese: false,
  tagsList: [
    {
      path: '/',
      label: '首页',
      icon: 's-home',
    },
  ],
}
const mutations = {
  selectMeum(state, val) {
    state.currentMeum = val
    let result = state.tagsList.findIndex((item) => item.path == val.path)
    result === -1 ? state.tagsList.push(val) : ''
  },
  closeTag(state, val) {
    let result = state.tagsList.findIndex((item) => item.path == val.path)
    state.tagsList.splice(result, 1)
  },
  collese(state) {
    state.isCollese = !state.isCollese
  },
}
const actions = {}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
}
